package com.bootdo.common.geneseq.sequence;

import com.bootdo.common.geneseq.exception.SeqException;

/**
 * 序列号生成器接口
 */
public interface Sequence {

    /**
     * 生成下一个序列号
     *
     * @return 序列号
     * @throws SeqException 序列号异常
     */
    long nextValue() throws SeqException;

    /**
     * 设置获取序列号业务编码
     */
    void setServiceCode(String name);
    String getServiceCode();

}
